<?
	$seq = $param->getNumber('seq');
	if ($seq!="")
	{
		$db = GetDefaultConnection();

		$sql = sprintf("SELECT * "
						.", (select CODE_NAME FROM TB_CODE WHERE CODE_TYPE='C' AND CODE_CODE1=a.ORDER_DESTINATION1 AND CODE_CODE2=0) as ORDER_DESTINATION1_NAME "
						.", (select CODE_NAME FROM TB_CODE WHERE CODE_TYPE='B' AND CODE_CODE1=4 AND a.ORDER_TYPE=CODE_CODE2) as ORDER_NAME "
						." FROM TB_ORDER a where ORDER_SEQ=%d", $seq);
		$list = $db->queryList($sql);

		if ($list != null)
		{
			$row = & $list->next();
			$ocode = $row->getString('ORDER_CODE');
			$ototal = $row->getNumber('ORDER_TOTAL');
			$odestname = $row->getString('ORDER_DESTINATION1_NAME');
			$odername = $row->getString('ORDER_NAME');
			$oitem1 = $row->getString('ORDER_ITEM1');
			$oitem2 = $row->getString('ORDER_ITEM2');
			$jbnh_seq = $row->getString('JBNH_SEQ');
			$oweight1 = $row->getString('ORDER_WEIGHT1');
			$oweight2 = $row->getString('ORDER_WEIGHT2');
			$ograde1 = $row->getString('ORDER_GRADE1');
			$ograde2 = $row->getString('ORDER_GRADE2');
			$ostandard1 = $row->getString('ORDER_STANDARD1');
			$ostandard2 = $row->getString('ORDER_STANDARD2');

		}
	}
?>